package com.dinglit.thread1;

/**
 * @email  740970978@qq.com
 * @author liuhuanchao
 * @since  2017-09-10
 *
 */

public class TestMain {

	public static void main(String[] args) {
		Thread1 thread1 = new Thread1("A");
		Thread1 thread2 = new Thread1("B");
        
		//start()方法的调用后并不是立即执行多线程代码，而是使得该线程变为可运行态（Runnable），什么时候运行是由操作系统决定的
		thread1.start();
		thread2.start();
		
		Thread1 thread3 = thread2;
		//但是start方法重复调用的话，会出现java.lang.IllegalThreadStateException异常
		thread3.start();
	}

}
